package @@packageName@@;

import java.util.Date;

import com.google.gwt.json.client.*;

public class ObjectArrayJsonizer {
        public static Character[] toJavaChar(JSONValue arg0) {
        if (arg0.isNull() != null) {
            return null;
        }

        JSONArray jsonArray = arg0.isArray();
        Character[] outputArray = new Character[jsonArray.size()];

        for (int i = 0, n = jsonArray.size(); i < n; i++) {
            outputArray[i] = ObjectJsonizer.toJavaChar(jsonArray.get(i));
        }

        return outputArray;
    }

    public static String[] toJavaString(JSONValue arg0) {
        if (arg0.isNull() != null) {
            return null;
        }

        JSONArray jsonArray = arg0.isArray();
        String[] outputArray = new String[jsonArray.size()];

        for (int i = 0, n = jsonArray.size(); i < n; i++) {
            outputArray[i] = ObjectJsonizer.toJavaString(jsonArray.get(i));
        }

        return outputArray;
    }

    public static Boolean[] toJavaBoolean(JSONValue arg0) {
        if (arg0.isNull() != null) {
            return null;
        }

        JSONArray jsonArray = arg0.isArray();
        Boolean[] outputArray = new Boolean[jsonArray.size()];

        for (int i = 0, n = jsonArray.size(); i < n; i++) {
            outputArray[i] = ObjectJsonizer.toJavaBoolean(jsonArray.get(i));
        }

        return outputArray;
    }

    public static Short[] toJavaShort(JSONValue arg0) {
        if (arg0.isArray() != null) {
            return null;
        }

        JSONArray jsonArray = arg0.isArray();
        Short[] outputArray = new Short[jsonArray.size()];

        for (int i = 0, n = jsonArray.size(); i < n; i++) {
            outputArray[i] = ObjectJsonizer.toJavaShort(jsonArray.get(i));
        }

        return outputArray;
    }

    public static Integer[] toJavaInteger(JSONValue arg0) {
        if (arg0.isArray() != null) {
            return null;
        }

        JSONArray jsonArray = arg0.isArray();
        Integer[] outputArray = new Integer[jsonArray.size()];

        for (int i = 0, n = jsonArray.size(); i < n; i++) {
            outputArray[i] = ObjectJsonizer.toJavaInteger(jsonArray.get(i));
        }

        return outputArray;
    }

    public static Long[] toJavaLong(JSONValue arg0) {
        if (arg0.isArray() != null) {
            return null;
        }

        JSONArray jsonArray = arg0.isArray();
        Long[] outputArray = new Long[jsonArray.size()];

        for (int i = 0, n = jsonArray.size(); i < n; i++) {
            outputArray[i] = ObjectJsonizer.toJavaLong(jsonArray.get(i));
        }

        return outputArray;
    }

    public static Float[] toJavaFloat(JSONValue arg0) {
        if (arg0.isArray() != null) {
            return null;
        }

        JSONArray jsonArray = arg0.isArray();
        Float[] outputArray = new Float[jsonArray.size()];

        for (int i = 0, n = jsonArray.size(); i < n; i++) {
            outputArray[i] = ObjectJsonizer.toJavaFloat(jsonArray.get(i));
        }

        return outputArray;
    }

    public static Double[] toJavaDouble(JSONValue arg0) {
        if (arg0.isArray() != null) {
            return null;
        }

        JSONArray jsonArray = arg0.isArray();
        Double[] outputArray = new Double[jsonArray.size()];

        for (int i = 0, n = jsonArray.size(); i < n; i++) {
            outputArray[i] = ObjectJsonizer.toJavaDouble(jsonArray.get(i));
        }

        return outputArray;
    }

    public static Date[] toJavaDate(JSONValue arg0) {
        if (arg0.isArray() != null) {
            return null;
        }

        JSONArray jsonArray = arg0.isArray();
        Date[] outputArray = new Date[jsonArray.size()];

        for (int i = 0, n = jsonArray.size(); i < n; i++) {
            outputArray[i] = ObjectJsonizer.toJavaDate(jsonArray.get(i));
        }

        return outputArray;
    }

    public static JSONValue toJsonChar(Character[] arg0) {
        if (arg0 == null) {
            return JSONNull.getInstance();
        }

        JSONArray outputArray = new JSONArray();
        for (int i = 0, n = arg0.length; i < n; i++) {
            outputArray.set(i, ObjectJsonizer.toJsonChar(arg0[i]));
        }

        return outputArray;
    }

    public static JSONValue toJsonString(String[] arg0) {
        if (arg0 == null) {
            return JSONNull.getInstance();
        }

        JSONArray outputArray = new JSONArray();
        for (int i = 0, n = arg0.length; i < n; i++) {
            outputArray.set(i, ObjectJsonizer.toJsonString(arg0[i]));
        }

        return outputArray;
    }

    public static JSONValue toJsonBoolean(Boolean[] arg0) {
        if (arg0 == null) {
            return JSONNull.getInstance();
        }

        JSONArray outputArray = new JSONArray();
        for (int i = 0, n = arg0.length; i < n; i++) {
            outputArray.set(i, ObjectJsonizer.toJsonBoolean(arg0[i]));
        }

        return outputArray;
    }

    public static JSONValue toJsonShort(Short[] arg0) {
        if (arg0 == null) {
            return JSONNull.getInstance();
        }

        JSONArray outputArray = new JSONArray();
        for (int i = 0, n = arg0.length; i < n; i++) {
            outputArray.set(i, ObjectJsonizer.toJsonShort(arg0[i]));
        }

        return outputArray;
    }

    public static JSONValue toJsonInteger(Integer[] arg0) {
        if (arg0 == null) {
            return JSONNull.getInstance();
        }

        JSONArray outputArray = new JSONArray();
        for (int i = 0, n = arg0.length; i < n; i++) {
            outputArray.set(i, ObjectJsonizer.toJsonInteger(arg0[i]));
        }

        return outputArray;
    }

    public static JSONValue toJsonLong(Long[] arg0) {
        if (arg0 == null) {
            return JSONNull.getInstance();
        }

        JSONArray outputArray = new JSONArray();
        for (int i = 0, n = arg0.length; i < n; i++) {
            outputArray.set(i, ObjectJsonizer.toJsonLong(arg0[i]));
        }

        return outputArray;
    }

    public static JSONValue toJsonFloat(Float[] arg0) {
        if (arg0 == null) {
            return JSONNull.getInstance();
        }

        JSONArray outputArray = new JSONArray();
        for (int i = 0, n = arg0.length; i < n; i++) {
            outputArray.set(i, ObjectJsonizer.toJsonFloat(arg0[i]));
        }

        return outputArray;
    }

    public static JSONValue toJsonDouble(Double[] arg0) {
        if (arg0 == null) {
            return JSONNull.getInstance();
        }

        JSONArray outputArray = new JSONArray();
        for (int i = 0, n = arg0.length; i < n; i++) {
            outputArray.set(i, ObjectJsonizer.toJsonDouble(arg0[i]));
        }

        return outputArray;
    }

    public static JSONValue toJsonDate(Date[] arg0) {
        if (arg0 == null) {
            return JSONNull.getInstance();
        }

        JSONArray outputArray = new JSONArray();
        for (int i = 0, n = arg0.length; i < n; i++) {
            outputArray.set(i, ObjectJsonizer.toJsonDate(arg0[i]));
        }

        return outputArray;
    }

}
